//在html添加数据
$.get('http://localhost:3000/user',data=>{
    data:filter(item=>{
        let html=
        `
        <tr>
        <td>${name=id}</td>
        <td>${name=title}</td>
        <td>${name=summary}</td>
        <td>${name=content}</td>
        <td>${name=classify}</td>
        <td>${name=writer}</td>
        <td>${name=time}</td>
        </tr>
        `
        $('#lol').append(html);
    })
})
//删除
function shan(id){
    console.log(id);
    let msg=confirm('确定删除吗?')
    if(msg){
        $.ajax({
            url:`http://localhost:8000/user/${id}`,
            type:'delete',
            success:function(res){
                window.location.href='index.html'
            }
        })
    }
}
